home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 3_2004-2005.ISO / Data / Zips / Transport_18194311182004.psc / Transport Automation System 1.0 / authentication.frm < prev    next >
Text File  |  2004-10-17  |  6KB  |  187 lines

  1. VERSION 5.00
  2. Begin VB.Form authentication 
  3.    Caption         =   "Authentication"
  4.    ClientHeight    =   2835
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5295
  8.    BeginProperty Font 
  9.       Name            =   "Verdana"
  10.       Size            =   9.75
  11.       Charset         =   0
  12.       Weight          =   400
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    Icon            =   "authentication.frx":0000
  18.    LinkTopic       =   "Form1"
  19.    MaxButton       =   0   'False
  20.    Moveable        =   0   'False
  21.    Picture         =   "authentication.frx":08CA
  22.    ScaleHeight     =   2835
  23.    ScaleWidth      =   5295
  24.    StartUpPosition =   2  'CenterScreen
  25.    Begin VB.CommandButton Command2 
  26.       Caption         =   "&Cancel"
  27.       BeginProperty Font 
  28.          Name            =   "MS Sans Serif"
  29.          Size            =   8.25
  30.          Charset         =   0
  31.          Weight          =   400
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Height          =   495
  37.       Left            =   2640
  38.       TabIndex        =   6
  39.       Top             =   2040
  40.       Width           =   1215
  41.    End
  42.    Begin VB.CommandButton Command1 
  43.       Caption         =   "&Login"
  44.       BeginProperty Font 
  45.          Name            =   "Microsoft Sans Serif"
  46.          Size            =   8.25
  47.          Charset         =   0
  48.          Weight          =   400
  49.          Underline       =   0   'False
  50.          Italic          =   0   'False
  51.          Strikethrough   =   0   'False
  52.       EndProperty
  53.       Height          =   495
  54.       Left            =   1320
  55.       TabIndex        =   5
  56.       Top             =   2040
  57.       Width           =   1215
  58.    End
  59.    Begin VB.TextBox Text2 
  60.       Appearance      =   0  'Flat
  61.       BeginProperty Font 
  62.          Name            =   "MS Sans Serif"
  63.          Size            =   9.75
  64.          Charset         =   0
  65.          Weight          =   400
  66.          Underline       =   0   'False
  67.          Italic          =   0   'False
  68.          Strikethrough   =   0   'False
  69.       EndProperty
  70.       Height          =   285
  71.       IMEMode         =   3  'DISABLE
  72.       Left            =   1800
  73.       PasswordChar    =   "0"
  74.       TabIndex        =   2
  75.       Top             =   1560
  76.       Width           =   3135
  77.    End
  78.    Begin VB.TextBox Text1 
  79.       Appearance      =   0  'Flat
  80.       BeginProperty Font 
  81.          Name            =   "MS Sans Serif"
  82.          Size            =   9.75
  83.          Charset         =   0
  84.          Weight          =   400
  85.          Underline       =   0   'False
  86.          Italic          =   0   'False
  87.          Strikethrough   =   0   'False
  88.       EndProperty
  89.       Height          =   285
  90.       Left            =   1800
  91.       TabIndex        =   0
  92.       Top             =   1200
  93.       Width           =   3135
  94.    End
  95.    Begin VB.Label Label4 
  96.       BackStyle       =   0  'Transparent
  97.       Caption         =   "Transport Automation System"
  98.       BeginProperty Font 
  99.          Name            =   "Verdana"
  100.          Size            =   12
  101.          Charset         =   0
  102.          Weight          =   700
  103.          Underline       =   0   'False
  104.          Italic          =   0   'False
  105.          Strikethrough   =   0   'False
  106.       EndProperty
  107.       ForeColor       =   &H00FFFFFF&
  108.       Height          =   375
  109.       Left            =   840
  110.       TabIndex        =   4
  111.       Top             =   240
  112.       Width           =   3975
  113.    End
  114.    Begin VB.Label Label2 
  115.       BackStyle       =   0  'Transparent
  116.       Caption         =   "Password"
  117.       BeginProperty Font 
  118.          Name            =   "Verdana"
  119.          Size            =   9.75
  120.          Charset         =   0
  121.          Weight          =   700
  122.          Underline       =   0   'False
  123.          Italic          =   0   'False
  124.          Strikethrough   =   0   'False
  125.       EndProperty
  126.       Height          =   255
  127.       Left            =   360
  128.       TabIndex        =   3
  129.       Top             =   1560
  130.       Width           =   1455
  131.    End
  132.    Begin VB.Label Label1 
  133.       BackStyle       =   0  'Transparent
  134.       Caption         =   "User Name"
  135.       BeginProperty Font 
  136.          Name            =   "Verdana"
  137.          Size            =   9.75
  138.          Charset         =   0
  139.          Weight          =   700
  140.          Underline       =   0   'False
  141.          Italic          =   0   'False
  142.          Strikethrough   =   0   'False
  143.       EndProperty
  144.       Height          =   255
  145.       Left            =   360
  146.       TabIndex        =   1
  147.       Top             =   1200
  148.       Width           =   1455
  149.    End
  150. End
  151. Attribute VB_Name = "authentication"
  152. Attribute VB_GlobalNameSpace = False
  153. Attribute VB_Creatable = False
  154. Attribute VB_PredeclaredId = True
  155. Attribute VB_Exposed = False
  156. 'ensrypt=1234 code
  157. Dim u, p As String
  158.  
  159. Private Sub Command1_Click()
  160. If StrComp(Text1.Text, u) = 0 And StrComp(Text2.Text, p) = 0 Then
  161. Unload Me
  162. main.Show
  163. Else
  164. MsgBox "Invalid User Name or Password"
  165. Text2.Text = ""
  166. Text2.SetFocus
  167. End If
  168. End Sub
  169.  
  170. Private Sub Command2_Click()
  171. End
  172. End Sub
  173.  
  174. Private Sub Form_Load()
  175. On Error Resume Next
  176. Open App.Path & "\configtas.dll" For Input As #1
  177. Input #1, u
  178. Input #1, p
  179. Close #1
  180. u = Decrypt(1234, Trim(u))
  181. p = Decrypt(1234, Trim(p))
  182. If Err Then
  183. MsgBox Err.Description
  184. End If
  185.  
  186. End Sub
  187.